package io.jee.caisan.weixin.domain;

import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;

import org.hibernate.annotations.DynamicUpdate;

/**
 * 微信图文素材
 * 
 * @author xiexx
 *
 */
@Entity
@DynamicUpdate
public class MpMaterialNews {
	private String mediaId;
    private Date updateTime;
    private List<MpMaterialNewsArticle> articles;

	@Id
	public String getMediaId() {
		return mediaId;
	}

	public void setMediaId(String mediaId) {
		this.mediaId = mediaId;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@OneToMany(cascade = {CascadeType.ALL})
	@JoinColumn(name="news_id")  
	public List<MpMaterialNewsArticle> getArticles() {
		return articles;
	}

	public void setArticles(List<MpMaterialNewsArticle> articles) {
		this.articles = articles;
	}
	
}
